<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <script src="static/js/jquery-3.3.1.min.js"></script>
</head>
<body>
  <div id="content">

  </div>
</body>
<script>
  $(function(){
      $.ajax({
          url: "/topic/list?offset=0&limit=10&sort=topicId&order=desc",
          dataType: "json",
          success: function(data){
            console.log(data);

            for(var i = 0; i < data.rows.length; i++){
                var a =
                    '<a href="2.html?topicId='+data.rows[i].topicId+'"><div style="border: #0f0f0f solid"><h3>'+data.rows[i].title+'</h3><span>'+data.rows[i].content+'</span> <br>'+data.rows[i].createTime+'</div>';
                $(a).appendTo("#content");
            }
          }
      });
  })
</script>
</html>